<template>
    <div v-html="compiledMarkdown" style="width:100%;min-height: 120px; border:1px solid #ccc;padding: 6px;"></div>
</template>

<script>
import { marked } from 'marked';

export default{
    props:{
        modelValue:String,
        text:String,
    },
    emits:["updateModelValue"],
    computed:{
        compiledMarkdown(){
            return marked(this.text || this.modelValue || "");
        }
    }
}
</script>